<template>
  <div class="article-list__container">
    <!-- 文章列表 -->
    <ArticleItem v-for="(obj,index) in arr" :key="obj.art_id" :item="obj" :i="index"
      @dislike="dislikeFn" @click.native="$router.push(`/article_detail?id=${obj.art_id}`)">
    </ArticleItem>
  </div>
</template>

<script>

export default {
  name: 'ArticleList',
  props: {
    arr: {
      type: Array,
      required: true
    }
  },
  methods: {
    dislikeFn (index) {
      this.$emit('dislike', index)
    }
  }
}
</script>
